#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QTextEdit>
#include <QPushButton>
#include <QTimer>
#include <QSpinBox>
#include <QFileDialog>
#include <QFontDialog>
#include <QColorDialog>
#include <QVBoxLayout>
#include <QLabel>
#include <QFile>
#include <QTextStream>

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();
private slots:
    void openFile();
    void chooseFont();
    void chooseColor();
    void updateFontSize(int size);
    void updateSpeed(int speed);
    void displayNextLine();

private:
    Ui::Widget *ui;
    QTextEdit *textEdit;
    QSpinBox *fontSizeSpinBox;
    QSpinBox *speedSpinBox;
    QTimer *timer;
    QStringList lines;
    int currentLine = 0;
};
#endif // WIDGET_H
